package com.hcms.admin.dto;

import cn.hutool.core.bean.BeanUtil;
import com.hcms.common.util.TreeNode;
import com.hcms.mybatis.entity.SysMenu;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SysMenuOptionResponse implements Serializable, TreeNode<SysMenuOptionResponse, Long> {

    private Long id;

    private Long parentId;

    private String metaTitle;

    private List<SysMenuOptionResponse> children;

    public SysMenuOptionResponse(SysMenu menu) {
        BeanUtil.copyProperties(menu, this);
    }
}
